/*
 * @Description: 日志管理页面
 * @Author: Rfan
 * @Date: 2022-09-19 14:08:51
 * @LastEditTime: 2022-09-19 17:49:27
 */

import cs from 'classnames';
import ResultList from './ResultList';
import UploadPage from './UploadPage';
import { PAGE_TYPE_UPLOAD } from '@/view/management/OnlinePreview/constants';
import { useOnlinePreviewContext } from '@/view/management/OnlinePreview/contexts/OnlinePreviewContext';

const PageContent = (props: any) => {
  const { className } = props;
  const { currentPage } = useOnlinePreviewContext();

  return (
    <div className={cs(className)}>
      {currentPage === PAGE_TYPE_UPLOAD ? <UploadPage /> : <ResultList />}
    </div>
  );
};

export default PageContent;
